* {
  margin: 0;
  padding: 0;
  border: 0;
}
.switch {
  position: relative;
  width: 4rem;
  height: 1.56rem;
  margin-top: 0.6rem;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
.switch-checkbox {
  display: none;
}
.switch-label {
  display: block;
  overflow: hidden;
  cursor: pointer;
  border: 0.04rem solid #f4f4f4;
  border-radius: 0.8rem;
  width: 4rem;
  text-align: left;
}
.switch-inner {
  display: block;
  width: 200%;
  margin-left: -100%;
  transition: margin 0.3s ease-in 0s;
}
.switch-inner::before,
.switch-inner::after {
  display: block;
  float: right;
  width: 50%;
  height: 1.4rem;
  padding: 0;
  line-height: 0.84rem;
  font-size: 0.84rem;
  color: white;
  font-family: Trebuchet, Arial, sans-serif;
/*   font-weight: bold; */
  box-sizing: border-box;
}
.switch-inner::after {
  content: attr(data-on);
  padding-left: 0.5rem;
  padding-top: 0.32rem;
  background-color: #4cd864;
  color: #FFFFFF;
}
.switch-inner::before {
  content: attr(data-off);
  padding-left: 1.7rem;
  background-color: #EEEEEE;
  padding-top: 0.32rem;
  color: black;
}
.switch-switch {
  position: absolute;
  display: block;
  width: 1rem;
  height: 1rem;
  margin: 0.2rem;
  background: #FFFFFF;
  top: 0;
  bottom: 0;
  right: 2.44rem;
  border: 0.04rem solid #999999;
  border-radius: 0.8rem;
  transition: all 0.3s ease-in 0s;
}
.switch-checkbox:checked + .switch-label .switch-inner {
  margin-left: 0;
}
.switch-checkbox:checked + .switch-label .switch-switch {
  right: 0rem;
}
